home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / ditroff / RCS / tmac.unix,v < prev   
Text File  |  1991-07-10  |  11KB  |  597 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.2
  10. date     91.07.10.09.02.44;  author ouster;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     90.01.27.11.55.11;  author ouster;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @Slight adjustments in vertical-bar stuff to fix problems with Tcl.man.
  27. @
  28. text
  29. @.\" This file contains a combination of the BSD -man macros and the Sprite
  30. .\" man macro additions which are stored in tmac.sprite.  This file is
  31. .\" useful for sending to UNIX systems with Sprite man pages, so that the
  32. .\" man pages may be formatted correctly.
  33. .\"
  34. .\" Copyright (c) 1980 Regents of the University of California.
  35. .\" All rights reserved.  The Berkeley software License Agreement
  36. .\" specifies the terms and conditions for redistribution.
  37. .\"
  38. .\"    @@(#)tmac.an.new    6.3 (Berkeley) 2/2/86
  39. .\"
  40. '    DT, PD, SM, and B macros invoked internally.
  41. '    # month name
  42. .if "\nd"0" .nr m \n(mo-1
  43. .if "\nm"0" .ds ]m January
  44. .if "\nm"1" .ds ]m February
  45. .if "\nm"2" .ds ]m March
  46. .if "\nm"3" .ds ]m April
  47. .if "\nm"4" .ds ]m May
  48. .if "\nm"5" .ds ]m June
  49. .if "\nm"6" .ds ]m July
  50. .if "\nm"7" .ds ]m August
  51. .if "\nm"8" .ds ]m September
  52. .if "\nm"9" .ds ]m October
  53. .if "\nm"10" .ds ]m November
  54. .if "\nm"11" .ds ]m December
  55. '    # set the date
  56. .if n \{.nr m \nm+1
  57. .     ie \nd .ds ]W Modified \nm/\nd/\ny
  58. .     el .ds ]W Printed \n(mo/\n(dy/\n(yr\}
  59. .if t \{.ie \nd .ds ]W \*(]m \nd, 19\ny
  60. .     el .ds ]W \*(]m \n(dy, 19\n(yr\}
  61. .if t .ds ]W Sprite version 1.0
  62. .if n .ds ]W Sprite v1.0
  63. .if t .tr *\(**
  64. .ie n \{\
  65. .    ds lq \&"\"
  66. .    ds rq \&"\"
  67. .\}
  68. .el \{\
  69. .    ds rq ''
  70. .    ds lq ``
  71. .\}
  72. '    # reset the basic page layout
  73. .de }E
  74. .}f
  75. .in \\n()Ru+\\n(INu
  76. .ll \\n(LLu
  77. ..
  78. '    # default tabs
  79. .de DT
  80. 'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
  81. ..
  82. '    # set type font and size
  83. .de }f
  84. .ps 10
  85. .ft 1
  86. ..
  87. '    # handle the head of the page
  88. .de }H
  89. .ev 1
  90. .}C
  91. .ie "\*(.T"va" 'sp .1i
  92. .el 'sp .5i
  93. .ft 1
  94. .ps 10
  95. .tl @@\\*(]H@@\\*(]D@@\\*(]H@@
  96. 'sp .5i
  97. .ev
  98. .ns
  99. ..
  100. '    # handle the foot of the page
  101. .de }F
  102. .ev 1
  103. .ft 1
  104. .ps 10
  105. 'sp .5i
  106. .tl @@\\*(]W@@\\*(]L@@%@@
  107. 'bp
  108. .ev
  109. ..
  110. '    # the cut mark
  111. .if !"\*(.T"vp" .ig
  112. .de }C
  113. .po 0i
  114. .lt 7.45i
  115. .tl '__''__'
  116. .po
  117. .lt
  118. ..
  119. '    # the final cut mark
  120. .de }M
  121. .}N
  122. .wh -1p }C
  123. .ll \\n(LLu
  124. ..
  125. '    # no runout unless there was a .TH
  126. .de }K
  127. .}N
  128. .pl 1
  129. .ll \\n(LLu
  130. ..
  131. .em }K
  132. '    # set title and heading
  133. .de TH
  134. .PD
  135. .if n .nr IN .5i
  136. .if t .nr IN .5i
  137. .nr LL \\n(.l
  138. .ds ]H \\$1
  139. .ds ]D UNKNOWN MANUAL SECTION
  140. .if '\\$2'1' .ds ]D User Commands
  141. .if '\\$2'1C' .ds ]D User Commands
  142. .if '\\$2'1L' .ds ]D User Commands
  143. .if '\\$2'6' .ds ]D Games and Demos
  144. .if '\\$2'7' .ds ]D Tables
  145. .if '\\$2'2' .ds ]D C Library Procedures
  146. .if '\\$2'3' .ds ]D C Library Procedures
  147. .if '\\$2'3C' .ds ]D C Library Procedures
  148. .if '\\$2'3F' .ds ]D Fortran Library Procedures
  149. .if '\\$2'3S' .ds ]D C Library Procedures
  150. .if '\\$2'3M' .ds ]D Mathematical Library Procedures
  151. .if '\\$2'3N' .ds ]D C Library Procedures
  152. .if '\\$2'3R' .ds ]D RPC Services
  153. .if '\\$2'3X' .ds ]D C Library Procedures
  154. .if '\\$2'5' .ds ]D File Formats
  155. .if '\\$2'4' .ds ]D Devices
  156. .if '\\$2'8' .ds ]D User Commands
  157. .ds ]L\"
  158. .if !"\\$3"" .ds ]L \\$3
  159. .if !"\\$4"" .ds ]W \\$4
  160. .wh 0 }H
  161. .if t .if !"\*(.T"va" .wh -1i }F
  162. .if t .if "\*(.T"va" .wh -1.4i }F
  163. .if n .wh -1.167i }F
  164. .em }M
  165. .if \\n(nl .bp 1
  166. .}E
  167. .DT
  168. .nr )I .5i
  169. .nr )R 0
  170. .if n .na
  171. ..
  172. '    # section heading
  173. .de SH
  174. .ss 12
  175. .if "\\$1"SYNOPSIS" .ss 18
  176. .}X 0
  177. .nr )E 2
  178. .SM
  179. \&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
  180. ..
  181. '    # sub section heading
  182. .de SS
  183. .ne 4
  184. .}X \\n()Ru+\\n(INu ""
  185. \&\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6
  186. .br
  187. ..
  188. '    # subroutine for section heading
  189. .de }X
  190. .}E
  191. .ti \\$1
  192. .sp \\n()Pu
  193. .ne 2
  194. .nr )R 0
  195. .fi
  196. .it 1 }N
  197. .B
  198. ..
  199. '    # end of SH (cf }X above and }N below)
  200. .de }2
  201. .nr )E 0
  202. .}E
  203. .nr )I .5i
  204. .ns
  205. ..
  206. '    # italic
  207. .de I
  208. .ft 2
  209. .it 1 }N
  210. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  211. ..
  212. '    # bold
  213. .de B
  214. .ft 3
  215. .it 1 }N
  216. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  217. ..
  218. '    # small
  219. .de SM
  220. .ps 9
  221. .it 1 }N
  222. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  223. ..
  224. '    # combinations of Roman, italic, bold
  225. .de RI
  226. .}S 1 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  227. ..
  228. .de RB
  229. .}S 1 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  230. ..
  231. .de IR
  232. .}S 2 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  233. ..
  234. .de IB
  235. .}S 2 3 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  236. ..
  237. .de BR
  238. .}S 3 1 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  239. ..
  240. .de BI
  241. .}S 3 2 \& "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
  242. ..
  243. '    # make special case of shift out of italic
  244. .de }S
  245. .ds ]F
  246. .if "\\$1"2" .if !"\\$5"" .ds ]F\^
  247. .ie !"\\$4"" .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  248. .el \\$3
  249. .}f
  250. ..
  251. '    # paragraph
  252. .de LP
  253. .PP
  254. ..
  255. .de PP
  256. .sp \\n()Pu
  257. .ne 1.1v
  258. .}E
  259. .nr )I .5i
  260. .ns
  261. ..
  262. '    # synonym for .PP
  263. .de P
  264. .PP
  265. ..
  266. '    # paragraph distance
  267. .de PD
  268. .if t .nr )P .4v
  269. .if n .nr )P 1v
  270. .if !"\\$1"" .nr )P \\$1v
  271. ..
  272. '    # paragraph with hanging indent
  273. .de HP
  274. .sp \\n()Pu
  275. .ne 1.1v
  276. .if !"\\$1"" .nr )I \\$1n
  277. .ll \\n(LLu
  278. .in \\n()Ru+\\n(INu+\\n()Iu
  279. .ti \\n()Ru+\\n(INu
  280. .}f
  281. ..
  282. '    # indented paragraph
  283. .de IP
  284. .TP \\$2
  285. \&\\$1
  286. ..
  287. '    # tagged paragraph (paragraph with hanging label)
  288. .de TP
  289. .if !"\\$1"" .nr )I \\$1n
  290. .sp \\n()Pu
  291. .ne 1.1v
  292. .in \\n()Ru
  293. .nr )E 1
  294. .ns
  295. .it 1 }N
  296. .di ]B
  297. ..
  298. '    # end of TP (cf }N below)
  299. .de }1
  300. .ds ]X \&\\*(]B\\
  301. .nr )E 0
  302. .if !"\\$1"" .nr )I \\$1n
  303. .}f
  304. .ll \\n(LLu
  305. .in \\n()Ru+\\n(INu+\\n()Iu
  306. .ti \\n(INu
  307. .ie !\\n()Iu+\\n()Ru-\w@@\\*(]X@@u-3p \{\\*(]X
  308. .br\}
  309. .el \\*(]X\h@@|\\n()Iu+\\n()Ru@@\c
  310. .}f
  311. ..
  312. '    # handle end of 1-line features
  313. .de }N
  314. .if \\n()E .br
  315. .di
  316. .if "\\n()E"0" .}f
  317. .if "\\n()E"1" .}1
  318. .if "\\n()E"2" .}2
  319. .nr )E 0
  320. ..
  321. '    # increase relative indent
  322. .de RS
  323. .nr ]\\n+()p \\n()I
  324. .nr )\\n()p \\n()R
  325. .ie !"\\$1"" .nr )R +\\$1n
  326. .el .nr )R +\\n()I
  327. .nr )I .5i
  328. .}E
  329. ..
  330. .de DS
  331. .RS
  332. .nf
  333. .sp
  334. ..
  335. '    # decrease relative indent
  336. .de RE
  337. .if !"\\$1"" \{.ie "\\$1"0" .nr )p 1 1
  338. .        el .nr )p \\$1 1\}
  339. .ds ]i \\*(]I\\n()p
  340. .ds ]r \\*(]R\\n()p
  341. .nr )I \\*(]i
  342. .nr )R \\*(]r
  343. .if \\n()p .nr )p -1
  344. .}E
  345. ..
  346. .de DE
  347. .fi
  348. .RE
  349. .sp.5
  350. ..
  351. .nr )p 0 1
  352. .ds ]I \\\\n(]
  353. .ds ]R \\\\n()
  354. .bd S B 3
  355. .if t .ds R \(rg
  356. .if n .ds R (Reg.)
  357. .ds S \s10
  358. .hy 14
  359. .if "\*(.T"va" .po -0.4i
  360. .\" This file contains extra Ditroff macros used in Sprite man pages:
  361. .\"
  362. .\" .HS name section [date [version]]
  363. .\"    Replacement for .TH in other man pages.  See below for valid
  364. .\"    section names.
  365. .\"
  366. .\" .LG
  367. .\"    Increase font size;  opposite of .SM
  368. .\"
  369. .\" .AP type name in/out [indent]
  370. .\"    Start paragraph describing an argument to a library procedure.
  371. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  372. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  373. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  374. .\"    needed;  use .AS below instead)
  375. .\"
  376. .\" .AS [type [name]]
  377. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  378. .\"    name are examples of largest possible arguments that will be passed
  379. .\"    to .AP later.  If args are omitted, default tab stops are used.
  380. .\"
  381. .\" .BS
  382. .\"    Start box enclosure.  From here until next .BE, everything will be
  383. .\"    enclosed in one large box.
  384. .\"
  385. .\" .BE
  386. .\"    End of box enclosure.
  387. .\"
  388. .\" .VS
  389. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  390. .\"    of man pages.
  391. .\"
  392. .\" .VE
  393. .\"    End of vertical sidebar.
  394. .\"
  395. '    # Heading for Sprite man pages
  396. .de HS
  397. .PD
  398. .DT
  399. .AS
  400. .if n .nr IN .5i
  401. .if t .nr IN .5i
  402. .nr LL \\n(.l
  403. .ds ]S UNKNOWN SECTION (\\$2)
  404. .if '\\$2'cmds'       .ds ]S User Commands
  405. .if '\\$2'lib'        .ds ]S C Library Procedures
  406. .if '\\$2'dev'        .ds ]S Devices
  407. .if '\\$2'tcl'        .ds ]S Tcl Command Language Library
  408. .if '\\$2'admin'      .ds ]S Administrative Commands
  409. .if '\\$2'daemons'    .ds ]S Daemons
  410. .if '\\$2'files'      .ds ]S File Formats
  411. .ds ]H \\$1
  412. .ds ]D \\*(]S
  413. .ie '\\$3'' .ds ]L  Printed:\\ \\ \\*(DY
  414. .el         .ds ]L  Modified:\\ \\ \\$3
  415. .if t .ie '\\$4'' .ds ]W Sprite version 1.0
  416. .if t .el         .ds ]W Sprite version \\$4
  417. .if n .ie '\\$4'' .ds ]W Sprite v.1.0
  418. .if n .el         .ds ]W Sprite v.\\$4
  419. .if !"\\$3"" .ds ]L \\$3
  420. .wh 0 }H
  421. .if t .wh -1i }B
  422. .if n .wh -1.167i }F
  423. .if \\n(nl .bp 1
  424. .em }M
  425. .}E
  426. .DT
  427. .nr )I .5i
  428. .nr )R 0
  429. ..
  430. '    # Increase point size 1 tick
  431. .de LG
  432. .ps +1
  433. .it 1 }N
  434. .if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
  435. ..
  436. '    # Start an argument description
  437. .de AP
  438. .ie !"\\$4"" .TP \\$4
  439. .el \{\
  440. .   ie !"\\$2"" .TP \\n()Cu
  441. .   el          .TP 15
  442. .\}
  443. .ie !"\\$3"" \{\
  444. .ta \\n()Au \\n()Bu
  445. \&\\$1    \\fI\\$2\\fP    (\\$3)
  446. .\".b
  447. .\}
  448. .el \{\
  449. .br
  450. .ie !"\\$2"" \{\
  451. \&\\$1    \\fI\\$2\\fP
  452. .\}
  453. .el \{\
  454. \&\\fI\\$1\\fP
  455. .\}
  456. .\}
  457. .DT
  458. ..
  459. '    # define tabbing values for .AP
  460. .de AS
  461. .nr )A 10n
  462. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  463. .nr )B \\n()Au+15n
  464. .\"
  465. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  466. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  467. ..
  468. '    # BS - start boxed text
  469. .de BS
  470. .br
  471. .mk )a
  472. .ds )b 1
  473. .if n .nf
  474. .if n .ti 0
  475. .if n \l'\\n(.lu\(ul'
  476. .if n .fi
  477. ..
  478. '    # Special macro to handle page bottom:  finish off current
  479. '    # box/sidebar if in box/sidebar mode, then invoked standard
  480. '    # page bottom macro.
  481. .de }B
  482. .if '\\*()b'1' \{\
  483. .ev 1
  484. 'ti 0
  485. 'nf
  486. .if t \h'-1.5n'\L'|\\n()au-1.5v'\l'\\n(.lu+3n\(ul'\L'-|\\n()au+1.5v'\l'|0u-1.5n\(ul'
  487. 'sp -1
  488. .ev
  489. 'fi
  490. .\}
  491. .if '\\*()v'2' \{\
  492. .if t \{\
  493. .ev 1
  494. 'ti 0
  495. 'nf
  496. .br
  497. \h'\\n(.lu+3n'\v'-1v'\L'|\\n()bu-1v\(br'\v'-|\\n()bu+2v'\h'|0u'
  498. 'sp -1
  499. 'fi
  500. .ev
  501. .\}
  502. .\}
  503. .}F
  504. ..
  505. '    # What to do when the head of the page occurs during boxed text
  506. '    # or vertical sidebar: update starting position for box/sidebar.
  507. .am }H
  508. .mk )a
  509. .mk )b
  510. ..
  511. '    # BE - end boxed text (draw box now)
  512. .de BE
  513. .sp -1
  514. .nf
  515. .ti 0
  516. .ie n \l'\\n(.lu\(ul'
  517. .el \{
  518. \h'-1.5n'\L'|\\n()au-1.5v'\l'\\n(.lu+3n\(ul'\L'-|\\n()au+1.5v'\l'|0u-1.5n\(ul'
  519. .\"   \h = move left 1.5n
  520. .\"   \L = draw up,   len=  )a units + 1.5v 
  521. .\"    \L draws a line, arg = distance. if negative, draws up.
  522. .\"    The position in reg. )a is used to draw the vertical lines.
  523. .\"      |\\n)au = distance from current loc. to )a (negative distance)
  524. .\"      -1.5v   = distance above )a since there is text at )a's location
  525. .\"   \l = draw right, len= cur. line length + 3n using underrule
  526. .\"   \L = draw down, len=  )a units + 1.5v 
  527. .\"   \l = draw left, back to original spot
  528. .\}
  529. .fi
  530. .br
  531. .ds )b 0
  532. ..
  533. '    # VS - start vertical sidebar
  534. .de VS
  535. .mk )b
  536. .if n 'mc \s12\(br\s0
  537. .if t \{\
  538. .ds )v 2
  539. .\}
  540. ..
  541. '    # VE - end of vertical sidebar
  542. .de VE
  543. .if n 'mc
  544. .if t \{\
  545. .ev 1
  546. .nf
  547. .ti 0
  548. \h'|\\n(.lu+3n'\L'|\\n()bu-1v\(bv'\v'-|\\n()bu+1v'\h'-|\\n(.lu+3n'
  549. .sp -1
  550. .fi
  551. .ev
  552. .\}
  553. .ds )v 0
  554. ..
  555. .\"
  556. .\"  Define the string DY to be the current date
  557. .\"  format:  month day, year
  558. .\"
  559. .if \n(mo-0 .ds MO January
  560. .if \n(mo-1 .ds MO February
  561. .if \n(mo-2 .ds MO March
  562. .if \n(mo-3 .ds MO April
  563. .if \n(mo-4 .ds MO May
  564. .if \n(mo-5 .ds MO June
  565. .if \n(mo-6 .ds MO July
  566. .if \n(mo-7 .ds MO August
  567. .if \n(mo-8 .ds MO September
  568. .if \n(mo-9 .ds MO October
  569. .if \n(mo-10 .ds MO November
  570. .if \n(mo-11 .ds MO December
  571. .ds DY \*(MO \n(dy, 19\n(yr
  572. @
  573.  
  574.  
  575. 1.1
  576. log
  577. @Initial revision
  578. @
  579. text
  580. @d468 2
  581. a469 1
  582. \h'|\\n(.lu+2n'\v'-1v'\L'|\\n()au-1v\(br'\v'-|\\n()au+2v'\h'-|\\n(.lu+2n'
  583. d481 1
  584. d507 1
  585. a509 1
  586. .mk )a
  587. a514 1
  588. .ev 1
  589. d517 1
  590. d520 1
  591. a520 1
  592. \h'|\\n(.lu+2n'\L'|\\n()au-1v\(br'\v'-|\\n()au+1v'\h'-|\\n(.lu+2n'
  593. d523 1
  594. a525 1
  595. .ev
  596. @
  597.